<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>后台管理</title>
<link rel="stylesheet" type="text/css" href="{$Think.__PUBLIC__}css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{$Think.__PUBLIC__}css/style.css">
<link rel="stylesheet" type="text/css" href="{$Think.__PUBLIC__}css/font-awesome.min.css">
<script src="{$Think.__PUBLIC__}js/jquery-2.1.4.min.js"></script>
<!--[if gte IE 9]>
  <script src="{$Think.__PUBLIC__}js/jquery-1.11.1.min.js" type="text/javascript"></script>
  <script src="{$Think.__PUBLIC__}js/html5shiv.min.js" type="text/javascript"></script>
  <script src="{$Think.__PUBLIC__}js/respond.min.js" type="text/javascript"></script>
  <script src="{$Think.__PUBLIC__}js/selectivizr-min.js" type="text/javascript"></script>
<![endif]-->
<!--[if lt IE 9]>
  <script>window.location.href='upgrade-browser.html';</script>
<![endif]-->
  <style>
    .active206{
      color: #fff;
      background-color: #3399CC;
    }
  </style>
</head>

<body class="user-select">
{include file="/public/header"}
<section class="container-fluid">
  <div class="row">
{include file="/public/row"}
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main">
        <ol class="breadcrumb">
            <form action="{:url('index/index/index')}" method="get">
                <input type="text" MAXLENGTH="11" name="phone" placeholder="请输入用户手机号">
                <input type="submit" class="btn btn-primary" value="查询">
            </form>
        </ol>
        <div class="table-responsive">
          <table class="table table-striped table-hover">
            <thead>
              <tr>
                <th width="150px;"><span class="glyphicon glyphicon-file"></span> <span class="visible-lg">姓名</span></th>
                <th><span class="glyphicon glyphicon-file"></span> <span class="visible-lg">手机号</span></th>
                <th><span class="glyphicon glyphicon-file"></span> <span class="visible-lg">推荐人</span></th>
                <th><span class="glyphicon glyphicon-time"></span> <span class="visible-lg">需求</span></th>
                <th width="150px;"><span class="glyphicon glyphicon-time"></span> <span class="visible-lg">添加时间</span></th>
                <th width="150px;"><span class="glyphicon glyphicon-time"></span> <span class="visible-lg">操作删除</span></th>
              </tr>
            </thead>
            <tbody>
            {volist name="list" id="tick"}
            <tr>
               <td>{$tick.name}</td>
               <td>{$tick.phone}</td>
               <td>{$tick.identity}</td>
               <td>{$tick.dizhi}</td>
               <td>{$tick.add_time}</td>
               <td><button class="btn btn-primary shanchu" value="{$tick.id}">删除</button></td>
            </tr>
            {/volist}
            </tbody>
          </table>
            {$list->render()}
        </div>
    </div>
  </div>
</section>
<!--个人信息模态框-->
{include file="/public/state"}
<script src="{$Think.__PUBLIC__}js/bootstrap.min.js"></script>
<script>
    var dianji = $(".shanchu");
    dianji.click(function(){
        var rel = $(this).val();
        console.log(rel)
        if(window.confirm("此操作不可逆，是否确认？")) {
            $.ajax({
                type: "get",
                url: "{:url('index/index/del')}",
                data: {"id": rel},
                cache: false, //不缓存此页面
                success: function (data) {
                    if (data == 1) {
                        alert('删除成功');
                        history.go(0);
                    } else {
                        alert('删除失败');
                    }
                }
            });
        }
    });
</script>
</body>
</html>
